/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.task-input {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.task-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.task-input button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.task-input button:hover {
    background-color: #2980b9;
}

.task-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 16px;
    background-color: #ecf0f1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background-color: #3498db;
    color: white;
}

.filter-btn:hover {
    background-color: #bdc3c7;
}

#task-list {
    list-style: none;
    margin-bottom: 20px;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: all 0.3s;
}

.task-item:hover {
    background-color: #f9f9f9;
}

.task-checkbox {
    margin-right: 10px;
    cursor: pointer;
}

.task-text {
    flex: 1;
    word-break: break-word;
}

.task-text.completed {
    text-decoration: line-through;
    color: #95a5a6;
}

.task-actions {
    display: flex;
    gap: 8px;
}

.task-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #7f8c8d;
    font-size: 16px;
    transition: color 0.3s;
}

.task-btn:hover {
    color: #3498db;
}

.task-btn.delete:hover {
    color: #e74c3c;
}

footer {
    text-align: center;
    color: #7f8c8d;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .task-input {
        flex-direction: column;
    }
    
    .task-input button {
        width: 100%;
    }
    
    .task-filters {
        flex-wrap: wrap;
    }
    
    .task-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .task-actions {
        margin-top: 10px;
        align-self: flex-end;
    }
}